{
 "cells": [
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": [
    "# Financials Statements\n",
    "\n",
    "This notebook demonstrates how to get financial statements from the SEC Edgar database using the `edgar` package.\n",
    "\n",
    "**[Open this notebook in Google Colab](http://colab.research.google.com/github/dgunning/edgartools/blob/main/notebooks/Viewing-Financial-Statements.ipynb)**"
   ],
   "id": "83e75eb6785bc307"
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": "!pip install edgartools",
   "id": "3757be49b8baba13"
  },
  {
   "cell_type": "code",
   "id": "initial_id",
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2024-11-14T14:53:43.341472Z",
     "start_time": "2024-11-14T14:53:43.335571Z"
    }
   },
   "source": [
    "from edgar import *\n",
    "\n",
    "set_identity('demo@user.com')"
   ],
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\u001B[2;36m[09:53:43]\u001B[0m\u001B[2;36m \u001B[0m\u001B[34mINFO    \u001B[0m Identity of the Edgar REST client set to \u001B[1m[\u001B[0mdemo@user.com\u001B[1m]\u001B[0m                            \u001B]8;id=49368;file:///Users/dwight/PycharmProjects/edgartools/edgar/core.py\u001B\\\u001B[2mcore.py\u001B[0m\u001B]8;;\u001B\\\u001B[2m:\u001B[0m\u001B]8;id=579254;file:///Users/dwight/PycharmProjects/edgartools/edgar/core.py#163\u001B\\\u001B[2m163\u001B[0m\u001B]8;;\u001B\\\n"
      ],
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">[09:53:43] </span><span style=\"color: #000080; text-decoration-color: #000080\">INFO    </span> Identity of the Edgar REST client set to <span style=\"font-weight: bold\">[</span>demo@user.com<span style=\"font-weight: bold\">]</span>                            <a href=\"file:///Users/dwight/PycharmProjects/edgartools/edgar/core.py\" target=\"_blank\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">core.py</span></a><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">:</span><a href=\"file:///Users/dwight/PycharmProjects/edgartools/edgar/core.py#163\" target=\"_blank\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">163</span></a>\n",
       "</pre>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "execution_count": 4
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": [
    "## Get a company by ticker\n",
    "\n",
    "To start let's get a company by ticker"
   ],
   "id": "ebf7dcd8f569e536"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-11-14T14:55:06.207760Z",
     "start_time": "2024-11-14T14:55:06.202992Z"
    }
   },
   "cell_type": "code",
   "source": [
    "c = Company(\"TSLA\")\n",
    "c"
   ],
   "id": "29c4db0645860fbb",
   "outputs": [
    {
     "data": {
      "text/plain": [],
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "╭──────────────────────────────────────────────\u001B[1;38;5;71m Tesla, Inc. (TSLA) \u001B[0m───────────────────────────────────────────────╮\n",
       "│                                                                                                                 │\n",
       "│  \u001B[1m \u001B[0m\u001B[1mCIK    \u001B[0m\u001B[1m \u001B[0m \u001B[1m \u001B[0m\u001B[1mCategory               \u001B[0m\u001B[1m \u001B[0m \u001B[1m \u001B[0m\u001B[1mIndustry                             \u001B[0m\u001B[1m \u001B[0m \u001B[1m \u001B[0m\u001B[1mIncorporated\u001B[0m\u001B[1m \u001B[0m                     │\n",
       "│  ──────────────────────────────────────────────────────────────────────────────────────────                     │\n",
       "│  \u001B[1;35m \u001B[0m\u001B[1;35m1318605\u001B[0m\u001B[1;35m \u001B[0m  Large accelerated filer   Motor Vehicles & Passenger Car Bodies   Delaware                          │\n",
       "│                                                                                                                 │\n",
       "│ ╭───────── ✉ Mailing Address ──────────╮                 ╭──────── 🏢 Business Address ─────────╮               │\n",
       "│ │ 3500 DEER CREEK RD                   │                 │ 3500 DEER CREEK RD                   │               │\n",
       "│ │ PALO ALTO, CA 94304                  │                 │ PALO ALTO, CA 94304                  │               │\n",
       "│ ╰──────────────────────────────────────╯                 ╰──────────────────────────────────────╯               │\n",
       "╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 6
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": [
    "### Get the latest Financials\n",
    "Financial data is included with **10-K** and **10-Q** filings as XBRL attachments. **edgartools** allows you to access the latest 10-K financials directly from the company\n"
   ],
   "id": "14a06380e401e770"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-11-14T14:59:19.592685Z",
     "start_time": "2024-11-14T14:59:18.539647Z"
    }
   },
   "cell_type": "code",
   "source": [
    "financials = c.get_financials()\n",
    "financials"
   ],
   "id": "3c827af01d94cf7b",
   "outputs": [
    {
     "data": {
      "text/plain": [],
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "               \u001B[1;38;5;39mTesla, Inc.\u001B[0m Financials                \n",
       "╭───┬───────────────────────────────────────────────╮\n",
       "│ 1 │ \u001B[1mCover Page                                   \u001B[0m │\n",
       "│ 2 │ \u001B[1mConsolidated Balance Sheets                  \u001B[0m │\n",
       "│ 3 │ \u001B[1mIncome Statements                            \u001B[0m │\n",
       "│ 4 │ \u001B[1mConsolidated Statement of Cash Flows         \u001B[0m │\n",
       "│ 5 │ \u001B[1mConsolidated Statement of Shareholders Equity\u001B[0m │\n",
       "│ 6 │ \u001B[1mComprehensive Income Statement               \u001B[0m │\n",
       "╰───┴───────────────────────────────────────────────╯\n",
       "           \u001B[38;5;249mPeriod ending \u001B[0m\u001B[1mDecember 31, 2023\u001B[0m           "
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 8
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "The `Financials` object gives you quick access to the most common standard financial statements for our company. ",
   "id": "1cc8ae35323b48af"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-11-14T15:10:43.011350Z",
     "start_time": "2024-11-14T15:10:42.997631Z"
    }
   },
   "cell_type": "code",
   "source": "financials.balance_sheet",
   "id": "9e9977ccf47fbb7b",
   "outputs": [
    {
     "data": {
      "text/plain": [],
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "                                      \u001B[1;38;5;38mTesla, Inc.\u001B[0m                                       \n",
       "                              \u001B[1mConsolidated Balance Sheets\u001B[0m                               \n",
       "                                         \u001B[3;38;5;250mAnnual\u001B[0m                                         \n",
       "                                                                                        \n",
       " \u001B[1m \u001B[0m\u001B[1m                                                  \u001B[0m\u001B[1m \u001B[0m \u001B[1m        \u001B[0m\u001B[1m \u001B[0m \u001B[1m      2023\u001B[0m\u001B[1m \u001B[0m \u001B[1m      2022\u001B[0m\u001B[1m \u001B[0m \n",
       " ────────────────────────────────────────────────────────────────────────────────────── \n",
       "  \u001B[37m    Cash and cash equivalents                     \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m      16,398      16,253  \n",
       "  \u001B[37m    Short-term investments                        \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m      12,696       5,932  \n",
       "  \u001B[37m    Accounts receivable, net                      \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       3,508       2,952  \n",
       "  \u001B[37m    Inventory                                     \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m      13,626      12,839  \n",
       "  \u001B[37m    Prepaid expenses and other current assets     \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       3,388       2,941  \n",
       "  \u001B[1;38;5;32m    Total current assets                          \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m    49,616\u001B[0m  \u001B[1;38;5;32m    40,917\u001B[0m  \n",
       "  \u001B[37m  Operating lease vehicles, net                   \u001B[0m  \u001B[2;38;5;249m        \u001B[0m                          \n",
       "  \u001B[37m    Operating Lease Vehicles                      \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       5,989       5,035  \n",
       "  \u001B[37m  Solar energy systems, net                       \u001B[0m  \u001B[2;38;5;249m        \u001B[0m                          \n",
       "  \u001B[37m    Solar energy systems, net                     \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       5,229       5,489  \n",
       "  \u001B[37m  Property, plant and equipment, net              \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m      29,725      23,548  \n",
       "  \u001B[37m  Operating lease right-of-use assets             \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       4,180       2,563  \n",
       "  \u001B[37m  Digital assets, net                             \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m         184         184  \n",
       "  \u001B[37m  Intangible assets, net                          \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m         178         215  \n",
       "  \u001B[37m  Goodwill                                        \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m         253         194  \n",
       "  \u001B[37m  Deferred tax assets                             \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       6,733         328  \n",
       "  \u001B[37m  Other non-current assets                        \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       4,531       3,865  \n",
       "  \u001B[1;38;5;32m  Total assets                                    \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m   106,618\u001B[0m  \u001B[1;38;5;32m    82,338\u001B[0m  \n",
       "  \u001B[37m    Accounts payable                              \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m      14,431      15,255  \n",
       "  \u001B[37m    Accrued liabilities and other                 \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       9,080       8,205  \n",
       "  \u001B[37m    Deferred revenue                              \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       2,864       1,747  \n",
       "  \u001B[37m    Current portion of debt and finance leases    \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       2,373       1,502  \n",
       "  \u001B[1;38;5;32m    Total current liabilities                     \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m    28,748\u001B[0m  \u001B[1;38;5;32m    26,709\u001B[0m  \n",
       "  \u001B[37m  Debt and finance leases, net of current portion \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       2,857       1,597  \n",
       "  \u001B[37m  Deferred revenue, net of current portion        \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       3,251       2,804  \n",
       "  \u001B[37m  Other long-term liabilities                     \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       8,153       5,330  \n",
       "  \u001B[1;38;5;32m  Total liabilities                               \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m    43,009\u001B[0m  \u001B[1;38;5;32m    36,440\u001B[0m  \n",
       "  \u001B[37mCommitments and contingencies (Note 15)           \u001B[0m  \u001B[2;38;5;249m        \u001B[0m                          \n",
       "  \u001B[37mRedeemable noncontrolling interests in            \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m         242         409  \n",
       "  \u001B[37msubsidiaries                                      \u001B[0m                                    \n",
       "  \u001B[37m    Preferred stock; $0.001 par value; 100 shares \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m           0           0  \n",
       "  \u001B[37mauthorized; no shares issued and outstanding      \u001B[0m                                    \n",
       "  \u001B[37m    Common stock; $0.001 par value; 6,000 shares  \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m           3           3  \n",
       "  \u001B[37mauthorized; 3,185 and 3,164 shares issued and     \u001B[0m                                    \n",
       "  \u001B[37moutstanding as of December 31, 2023 and 2022,     \u001B[0m                                    \n",
       "  \u001B[37mrespectively                                      \u001B[0m                                    \n",
       "  \u001B[37m    Additional paid-in capital                    \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m      34,892      32,177  \n",
       "  \u001B[37m    Accumulated other comprehensive loss          \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (     143)  (     361)  \n",
       "  \u001B[37m    Retained earnings                             \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m      27,882      12,885  \n",
       "  \u001B[1;38;5;32m    Total stockholders’ equity                    \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m    62,634\u001B[0m  \u001B[1;38;5;32m    44,704\u001B[0m  \n",
       "  \u001B[37m  Noncontrolling interests in subsidiaries        \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m         733         785  \n",
       "  \u001B[1;38;5;32mTotal liabilities and equity                      \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m   106,618\u001B[0m  \u001B[1;38;5;32m    82,338\u001B[0m  \n",
       "                                                                                        "
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 12
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "#### Balance Sheet",
   "id": "30ae02ba78d7c91c"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-11-14T15:10:55.965077Z",
     "start_time": "2024-11-14T15:10:55.951864Z"
    }
   },
   "cell_type": "code",
   "source": "financials.balance_sheet()",
   "id": "d42ba84013a8bed0",
   "outputs": [
    {
     "data": {
      "text/plain": [],
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "                                      \u001B[1;38;5;38mTesla, Inc.\u001B[0m                                       \n",
       "                              \u001B[1mConsolidated Balance Sheets\u001B[0m                               \n",
       "                                         \u001B[3;38;5;250mAnnual\u001B[0m                                         \n",
       "                                                                                        \n",
       " \u001B[1m \u001B[0m\u001B[1m                                                  \u001B[0m\u001B[1m \u001B[0m \u001B[1m        \u001B[0m\u001B[1m \u001B[0m \u001B[1m      2023\u001B[0m\u001B[1m \u001B[0m \u001B[1m      2022\u001B[0m\u001B[1m \u001B[0m \n",
       " ────────────────────────────────────────────────────────────────────────────────────── \n",
       "  \u001B[37m    Cash and cash equivalents                     \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m      16,398      16,253  \n",
       "  \u001B[37m    Short-term investments                        \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m      12,696       5,932  \n",
       "  \u001B[37m    Accounts receivable, net                      \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       3,508       2,952  \n",
       "  \u001B[37m    Inventory                                     \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m      13,626      12,839  \n",
       "  \u001B[37m    Prepaid expenses and other current assets     \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       3,388       2,941  \n",
       "  \u001B[1;38;5;32m    Total current assets                          \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m    49,616\u001B[0m  \u001B[1;38;5;32m    40,917\u001B[0m  \n",
       "  \u001B[37m  Operating lease vehicles, net                   \u001B[0m  \u001B[2;38;5;249m        \u001B[0m                          \n",
       "  \u001B[37m    Operating Lease Vehicles                      \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       5,989       5,035  \n",
       "  \u001B[37m  Solar energy systems, net                       \u001B[0m  \u001B[2;38;5;249m        \u001B[0m                          \n",
       "  \u001B[37m    Solar energy systems, net                     \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       5,229       5,489  \n",
       "  \u001B[37m  Property, plant and equipment, net              \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m      29,725      23,548  \n",
       "  \u001B[37m  Operating lease right-of-use assets             \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       4,180       2,563  \n",
       "  \u001B[37m  Digital assets, net                             \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m         184         184  \n",
       "  \u001B[37m  Intangible assets, net                          \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m         178         215  \n",
       "  \u001B[37m  Goodwill                                        \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m         253         194  \n",
       "  \u001B[37m  Deferred tax assets                             \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       6,733         328  \n",
       "  \u001B[37m  Other non-current assets                        \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       4,531       3,865  \n",
       "  \u001B[1;38;5;32m  Total assets                                    \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m   106,618\u001B[0m  \u001B[1;38;5;32m    82,338\u001B[0m  \n",
       "  \u001B[37m    Accounts payable                              \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m      14,431      15,255  \n",
       "  \u001B[37m    Accrued liabilities and other                 \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       9,080       8,205  \n",
       "  \u001B[37m    Deferred revenue                              \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       2,864       1,747  \n",
       "  \u001B[37m    Current portion of debt and finance leases    \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       2,373       1,502  \n",
       "  \u001B[1;38;5;32m    Total current liabilities                     \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m    28,748\u001B[0m  \u001B[1;38;5;32m    26,709\u001B[0m  \n",
       "  \u001B[37m  Debt and finance leases, net of current portion \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       2,857       1,597  \n",
       "  \u001B[37m  Deferred revenue, net of current portion        \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       3,251       2,804  \n",
       "  \u001B[37m  Other long-term liabilities                     \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       8,153       5,330  \n",
       "  \u001B[1;38;5;32m  Total liabilities                               \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m    43,009\u001B[0m  \u001B[1;38;5;32m    36,440\u001B[0m  \n",
       "  \u001B[37mCommitments and contingencies (Note 15)           \u001B[0m  \u001B[2;38;5;249m        \u001B[0m                          \n",
       "  \u001B[37mRedeemable noncontrolling interests in            \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m         242         409  \n",
       "  \u001B[37msubsidiaries                                      \u001B[0m                                    \n",
       "  \u001B[37m    Preferred stock; $0.001 par value; 100 shares \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m           0           0  \n",
       "  \u001B[37mauthorized; no shares issued and outstanding      \u001B[0m                                    \n",
       "  \u001B[37m    Common stock; $0.001 par value; 6,000 shares  \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m           3           3  \n",
       "  \u001B[37mauthorized; 3,185 and 3,164 shares issued and     \u001B[0m                                    \n",
       "  \u001B[37moutstanding as of December 31, 2023 and 2022,     \u001B[0m                                    \n",
       "  \u001B[37mrespectively                                      \u001B[0m                                    \n",
       "  \u001B[37m    Additional paid-in capital                    \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m      34,892      32,177  \n",
       "  \u001B[37m    Accumulated other comprehensive loss          \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (     143)  (     361)  \n",
       "  \u001B[37m    Retained earnings                             \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m      27,882      12,885  \n",
       "  \u001B[1;38;5;32m    Total stockholders’ equity                    \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m    62,634\u001B[0m  \u001B[1;38;5;32m    44,704\u001B[0m  \n",
       "  \u001B[37m  Noncontrolling interests in subsidiaries        \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m         733         785  \n",
       "  \u001B[1;38;5;32mTotal liabilities and equity                      \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m   106,618\u001B[0m  \u001B[1;38;5;32m    82,338\u001B[0m  \n",
       "                                                                                        "
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 13
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "#### Income Statement",
   "id": "be85cc82d79c4662"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-11-14T15:12:01.912912Z",
     "start_time": "2024-11-14T15:12:01.900630Z"
    }
   },
   "cell_type": "code",
   "source": "financials.income_statement()",
   "id": "3cd2edbb6b2cd909",
   "outputs": [
    {
     "data": {
      "text/plain": [],
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "                                            \u001B[1;38;5;38mTesla, Inc.\u001B[0m                                             \n",
       "                                         \u001B[1mIncome Statements\u001B[0m                                          \n",
       "                                               \u001B[3;38;5;250mAnnual\u001B[0m                                               \n",
       "                                                                                                    \n",
       " \u001B[1m \u001B[0m\u001B[1m                                                  \u001B[0m\u001B[1m \u001B[0m \u001B[1m        \u001B[0m\u001B[1m \u001B[0m \u001B[1m      2023\u001B[0m\u001B[1m \u001B[0m \u001B[1m      2022\u001B[0m\u001B[1m \u001B[0m \u001B[1m      2021\u001B[0m\u001B[1m \u001B[0m \n",
       " ────────────────────────────────────────────────────────────────────────────────────────────────── \n",
       "  \u001B[37m  Revenues                                        \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m      96,773      81,462      53,823  \n",
       "  \u001B[37m    Automotive Revenues                           \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m      82,419      71,462      47,232  \n",
       "  \u001B[37m    Energy generation and storage                 \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       6,035       3,909       2,789  \n",
       "  \u001B[37m    Services and other                            \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       8,319       6,091       3,802  \n",
       "  \u001B[37m  Total cost of revenues                          \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (  79,113)  (  60,609)  (  40,217)  \n",
       "  \u001B[37m    Automotive Revenues                           \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (  66,389)  (  51,108)  (  33,393)  \n",
       "  \u001B[37m    Energy generation and storage                 \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (   4,894)  (   3,621)  (   2,918)  \n",
       "  \u001B[37m    Services and other                            \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (   7,830)  (   5,880)  (   3,906)  \n",
       "  \u001B[1;38;5;32mGross profit                                      \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m    17,660\u001B[0m  \u001B[1;38;5;32m    20,853\u001B[0m  \u001B[1;38;5;32m    13,606\u001B[0m  \n",
       "  \u001B[37m  Research and development                        \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       3,969       3,075       2,593  \n",
       "  \u001B[37m  Selling, general and administrative             \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       4,800       3,946       4,517  \n",
       "  \u001B[37m  Restructuring and other                         \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m           0         176  (      27)  \n",
       "  \u001B[1;38;5;32m  Total operating expenses                        \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m(   8,769)\u001B[0m  \u001B[1;38;5;32m(   7,197)\u001B[0m  \u001B[1;38;5;32m(   7,083)\u001B[0m  \n",
       "  \u001B[1;38;5;32mIncome from operations                            \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m     8,891\u001B[0m  \u001B[1;38;5;32m    13,656\u001B[0m  \u001B[1;38;5;32m     6,523\u001B[0m  \n",
       "  \u001B[37mInterest income                                   \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       1,066         297          56  \n",
       "  \u001B[37mInterest expense                                  \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (     156)  (     191)  (     371)  \n",
       "  \u001B[37mOther income (expense), net                       \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m         172  (      43)         135  \n",
       "  \u001B[1;38;5;32mIncome before income taxes                        \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m     9,973\u001B[0m  \u001B[1;38;5;32m    13,719\u001B[0m  \u001B[1;38;5;32m     6,343\u001B[0m  \n",
       "  \u001B[37m(Benefit from) provision for income taxes         \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (   5,000)  (   1,130)  (     699)  \n",
       "  \u001B[1;38;5;32mNet income                                        \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m    14,974\u001B[0m  \u001B[1;38;5;32m    12,587\u001B[0m  \u001B[1;38;5;32m     5,644\u001B[0m  \n",
       "  \u001B[37mNet (loss) income attributable to noncontrolling  \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (      23)  (      31)  (     125)  \n",
       "  \u001B[37minterests and redeemable noncontrolling interests \u001B[0m                                                \n",
       "  \u001B[37min subsidiaries                                   \u001B[0m                                                \n",
       "  \u001B[1;38;5;32mNet income attributable to common stockholders    \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m    14,997\u001B[0m  \u001B[1;38;5;32m    12,556\u001B[0m  \u001B[1;38;5;32m     5,519\u001B[0m  \n",
       "  \u001B[37m  Basic (in dollars per share)                    \u001B[0m  \u001B[2;38;5;249m        \u001B[0m        4.73        4.02        1.87  \n",
       "  \u001B[37m  Diluted (in dollars per share)                  \u001B[0m  \u001B[2;38;5;249m        \u001B[0m         4.3        3.62        1.63  \n",
       "  \u001B[37m  Basic (in shares)                               \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       3,174       3,130       2,959  \n",
       "  \u001B[37m  Diluted (in shares)                             \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       3,485       3,475       3,386  \n",
       "                                                                                                    "
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 15
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "#### Cash Flow",
   "id": "5a875791edf2ecc3"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-11-14T15:11:06.939827Z",
     "start_time": "2024-11-14T15:11:06.763783Z"
    }
   },
   "cell_type": "code",
   "source": "financials.cashflow_statement()",
   "id": "febcc6053aa873aa",
   "outputs": [
    {
     "data": {
      "text/plain": [],
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "                                            \u001B[1;38;5;38mTesla, Inc.\u001B[0m                                             \n",
       "                                \u001B[1mConsolidated Statement of Cash Flows\u001B[0m                                \n",
       "                                               \u001B[3;38;5;250mAnnual\u001B[0m                                               \n",
       "                                                                                                    \n",
       " \u001B[1m \u001B[0m\u001B[1m                                                  \u001B[0m\u001B[1m \u001B[0m \u001B[1m        \u001B[0m\u001B[1m \u001B[0m \u001B[1m      2023\u001B[0m\u001B[1m \u001B[0m \u001B[1m      2022\u001B[0m\u001B[1m \u001B[0m \u001B[1m      2021\u001B[0m\u001B[1m \u001B[0m \n",
       " ────────────────────────────────────────────────────────────────────────────────────────────────── \n",
       "  \u001B[37m  Net income                                      \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m      14,974      12,587       5,644  \n",
       "  \u001B[37m    Depreciation, amortization and impairment     \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       4,667       3,747       2,911  \n",
       "  \u001B[37m    Stock-based compensation                      \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       1,812       1,560       2,121  \n",
       "  \u001B[37m    Inventory and purchase commitments write-downs\u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m         463         177         140  \n",
       "  \u001B[37m    Foreign currency transaction net unrealized   \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (     144)  (      81)  (      55)  \n",
       "  \u001B[37m(gain) loss                                       \u001B[0m                                                \n",
       "  \u001B[37m    Deferred income taxes                         \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (   6,349)  (     196)  (     149)  \n",
       "  \u001B[37m    Non-cash interest and other operating         \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (      81)  (     340)  (     245)  \n",
       "  \u001B[37mactivities                                        \u001B[0m                                                \n",
       "  \u001B[37m    Digital assets loss (gain), net               \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m          -0  (     140)  (      27)  \n",
       "  \u001B[37m      Accounts receivable                         \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (     586)  (   1,124)  (     130)  \n",
       "  \u001B[37m      Inventory                                   \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (   1,195)  (   6,465)  (   1,709)  \n",
       "  \u001B[37m      Operating lease vehicles                    \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (   1,952)  (   1,570)  (   2,114)  \n",
       "  \u001B[37m      Prepaid expenses and other assets           \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (   2,652)  (   3,713)  (   1,540)  \n",
       "  \u001B[37m      Accounts payable, accrued and other         \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       2,605       8,029       5,367  \n",
       "  \u001B[37mliabilities                                       \u001B[0m                                                \n",
       "  \u001B[37m      Deferred revenue                            \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       1,532       1,131         793  \n",
       "  \u001B[1;38;5;32m  Net cash provided by operating activities       \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m    13,256\u001B[0m  \u001B[1;38;5;32m    14,724\u001B[0m  \u001B[1;38;5;32m    11,497\u001B[0m  \n",
       "  \u001B[37m  Purchases of property and equipment excluding   \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (   8,898)  (   7,158)  (   6,482)  \n",
       "  \u001B[37mfinance leases, net of sales                      \u001B[0m                                                \n",
       "  \u001B[37m  Purchases of solar energy systems, net of sales \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (       1)  (       5)  (      32)  \n",
       "  \u001B[37m  Purchases of digital assets                     \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m          -0          -0  (   1,500)  \n",
       "  \u001B[37m  Proceeds from sales of digital assets           \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m           0         936         272  \n",
       "  \u001B[37m  Purchase of intangible assets                   \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m          -0  (       9)          -0  \n",
       "  \u001B[37m  Purchases of investments                        \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (  19,112)  (   5,835)  (     132)  \n",
       "  \u001B[37m  Proceeds from maturities of investments         \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m      12,353          22           0  \n",
       "  \u001B[37m  Proceeds from sales of investments              \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m         138           0           0  \n",
       "  \u001B[37m  Receipt of government grants                    \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m           0          76           6  \n",
       "  \u001B[37m  Business combinations, net of cash acquired     \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (      64)          -0          -0  \n",
       "  \u001B[1;38;5;32m  Net cash used in investing activities           \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m(  15,584)\u001B[0m  \u001B[1;38;5;32m(  11,973)\u001B[0m  \u001B[1;38;5;32m(   7,868)\u001B[0m  \n",
       "  \u001B[37m  Proceeds from issuances of debt                 \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       3,931           0       8,883  \n",
       "  \u001B[37m  Repayments of debt                              \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (   1,351)  (   3,364)  (  14,167)  \n",
       "  \u001B[37m  Collateralized lease repayments                 \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m           0           0  (       9)  \n",
       "  \u001B[37m  Proceeds from exercises of stock options and    \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m         700         541         707  \n",
       "  \u001B[37mother stock issuances                             \u001B[0m                                                \n",
       "  \u001B[37m  Principal payments on finance leases            \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (     464)  (     502)  (     439)  \n",
       "  \u001B[37m  Debt issuance costs                             \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (      29)          -0  (       9)  \n",
       "  \u001B[37m  Proceeds from investments by noncontrolling     \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m           0           0           2  \n",
       "  \u001B[37minterests in subsidiaries                         \u001B[0m                                                \n",
       "  \u001B[37m  Distributions paid to noncontrolling interests  \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (     144)  (     157)  (     161)  \n",
       "  \u001B[37min subsidiaries                                   \u001B[0m                                                \n",
       "  \u001B[37m  Payments for buy-outs of noncontrolling         \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  (      54)  (      45)  (      10)  \n",
       "  \u001B[37minterests in subsidiaries                         \u001B[0m                                                \n",
       "  \u001B[1;38;5;32m  Net cash provided by (used in) financing        \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m     2,589\u001B[0m  \u001B[1;38;5;32m(   3,527)\u001B[0m  \u001B[1;38;5;32m(   5,203)\u001B[0m  \n",
       "  \u001B[1;38;5;32mactivities                                        \u001B[0m                                                \n",
       "  \u001B[37mEffect of exchange rate changes on cash and cash  \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m           4  (     444)  (     183)  \n",
       "  \u001B[37mequivalents and restricted cash                   \u001B[0m                                                \n",
       "  \u001B[1;38;5;32mNet increase (decrease) in cash and cash          \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m       265\u001B[0m  \u001B[1;38;5;32m(   1,220)\u001B[0m  \u001B[1;38;5;32m(   1,757)\u001B[0m  \n",
       "  \u001B[1;38;5;32mequivalents and restricted cash                   \u001B[0m                                                \n",
       "  \u001B[1;38;5;32mCash and cash equivalents and restricted cash, end\u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m  \u001B[1;38;5;32m    17,189\u001B[0m  \u001B[1;38;5;32m    16,924\u001B[0m  \u001B[1;38;5;32m    18,144\u001B[0m  \n",
       "  \u001B[1;38;5;32mof period                                         \u001B[0m                                                \n",
       "  \u001B[37m  Acquisitions of property and equipment included \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       2,272       2,148       2,251  \n",
       "  \u001B[37min liabilities                                    \u001B[0m                                                \n",
       "  \u001B[37m  Cash paid during the period for interest, net of\u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m         126         152         266  \n",
       "  \u001B[37mamounts capitalized                               \u001B[0m                                                \n",
       "  \u001B[37m  Cash paid during the period for income taxes,   \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m       1,119       1,203         561  \n",
       "  \u001B[37mnet of refunds                                    \u001B[0m                                                \n",
       "                                                                                                    "
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 14
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": [
    "### XBRL Data Object\n",
    "\n",
    "The Financials is a shorthand way to get access to the common financial statements, but XBRL data can also have many more statements that you may need to access. For this, you can use the XBRL data object. "
   ],
   "id": "c30ba85a0a641267"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-11-14T15:13:10.256797Z",
     "start_time": "2024-11-14T15:13:10.235318Z"
    }
   },
   "cell_type": "code",
   "source": [
    "xb = financials.xb\n",
    "xb"
   ],
   "id": "8eca6ef94b026756",
   "outputs": [
    {
     "data": {
      "text/plain": [],
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "╭───────────────────────────────────────────────────── XBRL ──────────────────────────────────────────────────────╮\n",
       "│ \u001B[3m                  XBRL Instance                   \u001B[0m                                                              │\n",
       "│                                                                                                                 │\n",
       "│  \u001B[1m \u001B[0m\u001B[1mCompany    \u001B[0m\u001B[1m \u001B[0m \u001B[1m \u001B[0m\u001B[1mForm\u001B[0m\u001B[1m \u001B[0m \u001B[1m \u001B[0m\u001B[1mPeriod           \u001B[0m\u001B[1m \u001B[0m \u001B[1m \u001B[0m\u001B[1mFacts\u001B[0m\u001B[1m \u001B[0m                                                               │\n",
       "│  ────────────────────────────────────────────────                                                               │\n",
       "│   \u001B[1;38;5;32mTesla, Inc.\u001B[0m   10-K   December 31, 2023   1,583                                                                │\n",
       "│                                                                                                                 │\n",
       "│ \u001B[3m                          Financial Statements                          \u001B[0m                                        │\n",
       "│                                                                                                                 │\n",
       "│  \u001B[1m \u001B[0m\u001B[1mName                              \u001B[0m\u001B[1m \u001B[0m \u001B[1m \u001B[0m\u001B[1mAccessor                       \u001B[0m\u001B[1m \u001B[0m                                         │\n",
       "│  ──────────────────────────────────────────────────────────────────────                                         │\n",
       "│  \u001B[1m \u001B[0m\u001B[1mBalance Sheet                     \u001B[0m\u001B[1m \u001B[0m  \u001B[3mfinancials.balance_sheet       \u001B[0m                                          │\n",
       "│  \u001B[1m \u001B[0m\u001B[1mIncome Statement                  \u001B[0m\u001B[1m \u001B[0m  \u001B[3mfinancials.income              \u001B[0m                                          │\n",
       "│  \u001B[1m \u001B[0m\u001B[1mCash Flow Statement               \u001B[0m\u001B[1m \u001B[0m  \u001B[3mfinancials.cashflow            \u001B[0m                                          │\n",
       "│  \u001B[1m \u001B[0m\u001B[1mStatement of Changes in Equity    \u001B[0m\u001B[1m \u001B[0m  \u001B[3mfinancials.equity              \u001B[0m                                          │\n",
       "│  \u001B[1m \u001B[0m\u001B[1mStatement of Comprehensive Income \u001B[0m\u001B[1m \u001B[0m  \u001B[3mfinancials.comprehensive_income\u001B[0m                                          │\n",
       "│                                                                                                                 │\n",
       "╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 16
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": [
    "### All Statements\n",
    "\n",
    "To see all the statements that are included in the XBRL filing use the `statements` accessor. "
   ],
   "id": "6244a135200c48"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-11-14T15:13:34.953699Z",
     "start_time": "2024-11-14T15:13:34.935032Z"
    }
   },
   "cell_type": "code",
   "source": "xb.statements",
   "id": "e5dfef0013959114",
   "outputs": [
    {
     "data": {
      "text/plain": [],
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "╭─────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n",
       "│\u001B[1m \u001B[0m\u001B[1m   \u001B[0m\u001B[1m \u001B[0m│\u001B[1m \u001B[0m\u001B[1mStatements                                                                                               \u001B[0m\u001B[1m \u001B[0m│\n",
       "├─────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────┤\n",
       "│ 0   │ \u001B[38;5;32mCover\u001B[0m                                                                                                     │\n",
       "│ 1   │ \u001B[38;5;32mAudit\u001B[0m\u001B[38;5;160mInformation\u001B[0m                                                                                          │\n",
       "│ 2   │ \u001B[38;5;32mConsolidated\u001B[0m\u001B[38;5;160mBalance\u001B[0m\u001B[38;5;71mSheets\u001B[0m                                                                                 │\n",
       "│ 3   │ \u001B[38;5;32mConsolidated\u001B[0m\u001B[38;5;160mBalance\u001B[0m\u001B[38;5;71mSheets\u001B[0m\u001B[38;5;32mParenthetical\u001B[0m                                                                    │\n",
       "│ 4   │ \u001B[38;5;32mConsolidated\u001B[0m\u001B[38;5;160mStatementsof\u001B[0m\u001B[38;5;71mOperations\u001B[0m                                                                        │\n",
       "│ 5   │ \u001B[38;5;32mConsolidated\u001B[0m\u001B[38;5;160mStatementsof\u001B[0m\u001B[38;5;71mComprehensive\u001B[0m\u001B[38;5;32mIncome\u001B[0m                                                               │\n",
       "│ 6   │ \u001B[38;5;32mConsolidated\u001B[0m\u001B[38;5;160mStatementsof\u001B[0m\u001B[38;5;71mRedeemable\u001B[0m\u001B[38;5;32mNoncontrolling\u001B[0m\u001B[38;5;160mInterestand\u001B[0m\u001B[38;5;71mEquity\u001B[0m                                         │\n",
       "│ 7   │ \u001B[38;5;32mConsolidated\u001B[0m\u001B[38;5;160mStatementsof\u001B[0m\u001B[38;5;71mCash\u001B[0m\u001B[38;5;32mFlows\u001B[0m                                                                         │\n",
       "│ 8   │ \u001B[38;5;32mOverview\u001B[0m                                                                                                  │\n",
       "│ 9   │ \u001B[38;5;32mSummaryof\u001B[0m\u001B[38;5;160mSignificant\u001B[0m\u001B[38;5;71mAccounting\u001B[0m\u001B[38;5;32mPolicies\u001B[0m                                                                    │\n",
       "│ 10  │ \u001B[38;5;32mDigital\u001B[0m\u001B[38;5;160mAssets\u001B[0m\u001B[38;5;71mNet\u001B[0m                                                                                          │\n",
       "│ 11  │ \u001B[38;5;32mGoodwilland\u001B[0m\u001B[38;5;160mIntangible\u001B[0m\u001B[38;5;71mAssets\u001B[0m                                                                               │\n",
       "│ 12  │ \u001B[38;5;32mFair\u001B[0m\u001B[38;5;160mValueof\u001B[0m\u001B[38;5;71mFinancial\u001B[0m\u001B[38;5;32mInstruments\u001B[0m                                                                           │\n",
       "│ 13  │ \u001B[38;5;32mInventory\u001B[0m                                                                                                 │\n",
       "│ 14  │ \u001B[38;5;32mSolar\u001B[0m\u001B[38;5;160mEnergy\u001B[0m\u001B[38;5;71mSystems\u001B[0m\u001B[38;5;32mNet\u001B[0m                                                                                     │\n",
       "│ 15  │ \u001B[38;5;32mProperty\u001B[0m\u001B[38;5;160mPlantand\u001B[0m\u001B[38;5;71mEquipment\u001B[0m\u001B[38;5;32mNet\u001B[0m                                                                              │\n",
       "│ 16  │ \u001B[38;5;32mAccrued\u001B[0m\u001B[38;5;160mLiabilitiesand\u001B[0m\u001B[38;5;71mOther\u001B[0m                                                                                │\n",
       "│ 17  │ \u001B[38;5;32mOther\u001B[0m\u001B[38;5;160mLong\u001B[0m\u001B[38;5;71mTerm\u001B[0m\u001B[38;5;32mLiabilities\u001B[0m                                                                                  │\n",
       "│ 18  │ \u001B[38;5;32mDebt\u001B[0m                                                                                                      │\n",
       "│ 19  │ \u001B[38;5;32mLeases\u001B[0m                                                                                                    │\n",
       "│ 20  │ \u001B[38;5;32mEquity\u001B[0m\u001B[38;5;160mIncentive\u001B[0m\u001B[38;5;71mPlans\u001B[0m                                                                                      │\n",
       "│ 21  │ \u001B[38;5;32mIncome\u001B[0m\u001B[38;5;160mTaxes\u001B[0m                                                                                               │\n",
       "│ 22  │ \u001B[38;5;32mCommitmentsand\u001B[0m\u001B[38;5;160mContingencies\u001B[0m                                                                               │\n",
       "│ 23  │ \u001B[38;5;32mVariable\u001B[0m\u001B[38;5;160mInterest\u001B[0m\u001B[38;5;71mEntity\u001B[0m\u001B[38;5;32mArrangements\u001B[0m                                                                        │\n",
       "│ 24  │ \u001B[38;5;32mRelated\u001B[0m\u001B[38;5;160mParty\u001B[0m\u001B[38;5;71mTransactions\u001B[0m                                                                                  │\n",
       "│ 25  │ \u001B[38;5;32mSegment\u001B[0m\u001B[38;5;160mReportingand\u001B[0m\u001B[38;5;71mInformationabout\u001B[0m\u001B[38;5;32mGeographic\u001B[0m\u001B[38;5;160mAreas\u001B[0m                                                        │\n",
       "│ 26  │ \u001B[38;5;32mRestructuringand\u001B[0m\u001B[38;5;160mOther\u001B[0m                                                                                     │\n",
       "│ 27  │ \u001B[38;5;32mSummaryof\u001B[0m\u001B[38;5;160mSignificant\u001B[0m\u001B[38;5;71mAccounting\u001B[0m\u001B[38;5;32mPolicies\u001B[0m\u001B[38;5;160mPolicies\u001B[0m                                                            │\n",
       "│ 28  │ \u001B[38;5;32mSummaryof\u001B[0m\u001B[38;5;160mSignificant\u001B[0m\u001B[38;5;71mAccounting\u001B[0m\u001B[38;5;32mPolicies\u001B[0m\u001B[38;5;160mTables\u001B[0m                                                              │\n",
       "│ 29  │ \u001B[38;5;32mFair\u001B[0m\u001B[38;5;160mValueof\u001B[0m\u001B[38;5;71mFinancial\u001B[0m\u001B[38;5;32mInstruments\u001B[0m\u001B[38;5;160mTables\u001B[0m                                                                     │\n",
       "│ 30  │ \u001B[38;5;32mInventory\u001B[0m\u001B[38;5;160mTables\u001B[0m                                                                                           │\n",
       "│ 31  │ \u001B[38;5;32mSolar\u001B[0m\u001B[38;5;160mEnergy\u001B[0m\u001B[38;5;71mSystems\u001B[0m\u001B[38;5;32mNet\u001B[0m\u001B[38;5;160mTables\u001B[0m                                                                               │\n",
       "│ 32  │ \u001B[38;5;32mProperty\u001B[0m\u001B[38;5;160mPlantand\u001B[0m\u001B[38;5;71mEquipment\u001B[0m\u001B[38;5;32mNet\u001B[0m\u001B[38;5;160mTables\u001B[0m                                                                        │\n",
       "│ 33  │ \u001B[38;5;32mAccrued\u001B[0m\u001B[38;5;160mLiabilitiesand\u001B[0m\u001B[38;5;71mOther\u001B[0m\u001B[38;5;32mTables\u001B[0m                                                                          │\n",
       "│ 34  │ \u001B[38;5;32mOther\u001B[0m\u001B[38;5;160mLong\u001B[0m\u001B[38;5;71mTerm\u001B[0m\u001B[38;5;32mLiabilities\u001B[0m\u001B[38;5;160mTables\u001B[0m                                                                            │\n",
       "│ 35  │ \u001B[38;5;32mDebt\u001B[0m\u001B[38;5;160mTables\u001B[0m                                                                                                │\n",
       "│ 36  │ \u001B[38;5;32mLeases\u001B[0m\u001B[38;5;160mTables\u001B[0m                                                                                              │\n",
       "│ 37  │ \u001B[38;5;32mEquity\u001B[0m\u001B[38;5;160mIncentive\u001B[0m\u001B[38;5;71mPlans\u001B[0m\u001B[38;5;32mTables\u001B[0m                                                                                │\n",
       "│ 38  │ \u001B[38;5;32mIncome\u001B[0m\u001B[38;5;160mTaxes\u001B[0m\u001B[38;5;71mTables\u001B[0m                                                                                         │\n",
       "│ 39  │ \u001B[38;5;32mVariable\u001B[0m\u001B[38;5;160mInterest\u001B[0m\u001B[38;5;71mEntity\u001B[0m\u001B[38;5;32mArrangements\u001B[0m\u001B[38;5;160mTables\u001B[0m                                                                  │\n",
       "│ 40  │ \u001B[38;5;32mSegment\u001B[0m\u001B[38;5;160mReportingand\u001B[0m\u001B[38;5;71mInformationabout\u001B[0m\u001B[38;5;32mGeographic\u001B[0m\u001B[38;5;160mAreas\u001B[0m\u001B[38;5;71mTables\u001B[0m                                                  │\n",
       "│ 41  │ \u001B[38;5;32mOverview\u001B[0m\u001B[38;5;160mDetail\u001B[0m                                                                                            │\n",
       "│ 42  │ \u001B[38;5;32mSummaryof\u001B[0m\u001B[38;5;160mSignificant\u001B[0m\u001B[38;5;71mAccounting\u001B[0m\u001B[38;5;32mPolicies\u001B[0m\u001B[38;5;160mScheduleof\u001B[0m\u001B[38;5;71mDisaggregationof\u001B[0m\u001B[38;5;32mRevenueby\u001B[0m\u001B[38;5;160mMajor\u001B[0m\u001B[38;5;71mSource\u001B[0m\u001B[38;5;32mDetail\u001B[0m                │\n",
       "│ 43  │ \u001B[38;5;32mSummaryof\u001B[0m\u001B[38;5;160mSignificant\u001B[0m\u001B[38;5;71mAccounting\u001B[0m\u001B[38;5;32mPolicies\u001B[0m\u001B[38;5;160mAdditional\u001B[0m\u001B[38;5;71mInformation\u001B[0m\u001B[38;5;32mDetail\u001B[0m                                         │\n",
       "│ 44  │ \u001B[38;5;32mSummaryof\u001B[0m\u001B[38;5;160mSignificant\u001B[0m\u001B[38;5;71mAccounting\u001B[0m\u001B[38;5;32mPolicies\u001B[0m\u001B[38;5;160mScheduleof\u001B[0m\u001B[38;5;71mDeferred\u001B[0m\u001B[38;5;32mRevenue\u001B[0m\u001B[38;5;160mActivity\u001B[0m\u001B[38;5;71mDetails\u001B[0m                            │\n",
       "│ 45  │ \u001B[38;5;32mSummaryof\u001B[0m\u001B[38;5;160mSignificant\u001B[0m\u001B[38;5;71mAccounting\u001B[0m\u001B[38;5;32mPolicies\u001B[0m\u001B[38;5;160mScheduleof\u001B[0m\u001B[38;5;71mReconciliationof\u001B[0m\u001B[38;5;32mNet\u001B[0m\u001B[38;5;160mIncome\u001B[0m\u001B[38;5;71mUsedin\u001B[0m\u001B[38;5;32mComputing\u001B[0m\u001B[38;5;160mBasicand\u001B[0m\u001B[38;5;71mDiluted\u001B[0m\u001B[38;5;32mN…\u001B[0m │\n",
       "│ 46  │ \u001B[38;5;32mSummaryof\u001B[0m\u001B[38;5;160mSignificant\u001B[0m\u001B[38;5;71mAccounting\u001B[0m\u001B[38;5;32mPolicies\u001B[0m\u001B[38;5;160mScheduleof\u001B[0m\u001B[38;5;71mReconciliationof\u001B[0m\u001B[38;5;32mBasicto\u001B[0m\u001B[38;5;160mDiluted\u001B[0m\u001B[38;5;71mWeighted\u001B[0m\u001B[38;5;32mAverage\u001B[0m\u001B[38;5;160mShares\u001B[0m\u001B[38;5;71mUsedi…\u001B[0m │\n",
       "│ 47  │ \u001B[38;5;32mSummaryof\u001B[0m\u001B[38;5;160mSignificant\u001B[0m\u001B[38;5;71mAccounting\u001B[0m\u001B[38;5;32mPolicies\u001B[0m\u001B[38;5;160mScheduleof\u001B[0m\u001B[38;5;71mPotentially\u001B[0m\u001B[38;5;32mDilutive\u001B[0m\u001B[38;5;160mSharesthatwere\u001B[0m\u001B[38;5;71mExcludedfrom\u001B[0m\u001B[38;5;32mComputation…\u001B[0m │\n",
       "│ 48  │ \u001B[38;5;32mSummaryof\u001B[0m\u001B[38;5;160mSignificant\u001B[0m\u001B[38;5;71mAccounting\u001B[0m\u001B[38;5;32mPolicies\u001B[0m\u001B[38;5;160mScheduleof\u001B[0m\u001B[38;5;71mCashand\u001B[0m\u001B[38;5;32mCash\u001B[0m\u001B[38;5;160mEquivalentsand\u001B[0m\u001B[38;5;71mRestricted\u001B[0m\u001B[38;5;32mCash\u001B[0m\u001B[38;5;160mDetail\u001B[0m             │\n",
       "│ 49  │ \u001B[38;5;32mSummaryof\u001B[0m\u001B[38;5;160mSignificant\u001B[0m\u001B[38;5;71mAccounting\u001B[0m\u001B[38;5;32mPolicies\u001B[0m\u001B[38;5;160mEstimated\u001B[0m\u001B[38;5;71mUseful\u001B[0m\u001B[38;5;32mLivesof\u001B[0m\u001B[38;5;160mRespective\u001B[0m\u001B[38;5;71mAssets\u001B[0m\u001B[38;5;32mDetails\u001B[0m                       │\n",
       "│ 50  │ \u001B[38;5;32mSummaryof\u001B[0m\u001B[38;5;160mSignificant\u001B[0m\u001B[38;5;71mAccounting\u001B[0m\u001B[38;5;32mPolicies\u001B[0m\u001B[38;5;160mScheduleof\u001B[0m\u001B[38;5;71mEstimated\u001B[0m\u001B[38;5;32mUseful\u001B[0m\u001B[38;5;160mLivesof\u001B[0m\u001B[38;5;71mRelated\u001B[0m\u001B[38;5;32mAssets\u001B[0m\u001B[38;5;160mDetails\u001B[0m                │\n",
       "│ 51  │ \u001B[38;5;32mSummaryof\u001B[0m\u001B[38;5;160mSignificant\u001B[0m\u001B[38;5;71mAccounting\u001B[0m\u001B[38;5;32mPolicies\u001B[0m\u001B[38;5;160mScheduleof\u001B[0m\u001B[38;5;71mAccrued\u001B[0m\u001B[38;5;32mWarranty\u001B[0m\u001B[38;5;160mActivity\u001B[0m\u001B[38;5;71mDetail\u001B[0m                             │\n",
       "│ 52  │ \u001B[38;5;32mDigital\u001B[0m\u001B[38;5;160mAssets\u001B[0m\u001B[38;5;71mNet\u001B[0m\u001B[38;5;32mDetail\u001B[0m                                                                                    │\n",
       "│ 53  │ \u001B[38;5;32mGoodwilland\u001B[0m\u001B[38;5;160mIntangible\u001B[0m\u001B[38;5;71mAssets\u001B[0m\u001B[38;5;32mDetails\u001B[0m                                                                        │\n",
       "│ 54  │ \u001B[38;5;32mFair\u001B[0m\u001B[38;5;160mValueof\u001B[0m\u001B[38;5;71mFinancial\u001B[0m\u001B[38;5;32mInstruments\u001B[0m\u001B[38;5;160mScheduleof\u001B[0m\u001B[38;5;71mAssetsand\u001B[0m\u001B[38;5;32mLiabilities\u001B[0m\u001B[38;5;160mMeasuredat\u001B[0m\u001B[38;5;71mFair\u001B[0m\u001B[38;5;32mValueon\u001B[0m\u001B[38;5;160mRecurring\u001B[0m\u001B[38;5;71mBasis\u001B[0m\u001B[38;5;32mDetail\u001B[0m    │\n",
       "│ 55  │ \u001B[38;5;32mFair\u001B[0m\u001B[38;5;160mValueof\u001B[0m\u001B[38;5;71mFinancial\u001B[0m\u001B[38;5;32mInstruments\u001B[0m\u001B[38;5;160mScheduleof\u001B[0m\u001B[38;5;71mCash\u001B[0m\u001B[38;5;32mCash\u001B[0m\u001B[38;5;160mEquivalentsand\u001B[0m\u001B[38;5;71mMarketable\u001B[0m\u001B[38;5;32mSecurities\u001B[0m\u001B[38;5;160mDetails\u001B[0m                │\n",
       "│ 56  │ \u001B[38;5;32mFair\u001B[0m\u001B[38;5;160mValueof\u001B[0m\u001B[38;5;71mFinancial\u001B[0m\u001B[38;5;32mInstruments\u001B[0m\u001B[38;5;160mSummaryof\u001B[0m\u001B[38;5;71mFair\u001B[0m\u001B[38;5;32mValueof\u001B[0m\u001B[38;5;160mMarketable\u001B[0m\u001B[38;5;71mSecuritiesby\u001B[0m\u001B[38;5;32mContractual\u001B[0m\u001B[38;5;160mMaturities\u001B[0m\u001B[38;5;71mDetails\u001B[0m     │\n",
       "│ 57  │ \u001B[38;5;32mFair\u001B[0m\u001B[38;5;160mValueof\u001B[0m\u001B[38;5;71mFinancial\u001B[0m\u001B[38;5;32mInstruments\u001B[0m\u001B[38;5;160mAdditional\u001B[0m\u001B[38;5;71mInformation\u001B[0m\u001B[38;5;32mDetail\u001B[0m                                                │\n",
       "│ 58  │ \u001B[38;5;32mFair\u001B[0m\u001B[38;5;160mValueof\u001B[0m\u001B[38;5;71mFinancial\u001B[0m\u001B[38;5;32mInstruments\u001B[0m\u001B[38;5;160mScheduleof\u001B[0m\u001B[38;5;71mEstimated\u001B[0m\u001B[38;5;32mFair\u001B[0m\u001B[38;5;160mValuesand\u001B[0m\u001B[38;5;71mCarrying\u001B[0m\u001B[38;5;32mValues\u001B[0m\u001B[38;5;160mDetail\u001B[0m                       │\n",
       "│ 59  │ \u001B[38;5;32mInventory\u001B[0m\u001B[38;5;160mScheduleof\u001B[0m\u001B[38;5;71mInventory\u001B[0m\u001B[38;5;32mDetail\u001B[0m                                                                        │\n",
       "│ 60  │ \u001B[38;5;32mInventory\u001B[0m\u001B[38;5;160mAdditional\u001B[0m\u001B[38;5;71mInformation\u001B[0m\u001B[38;5;32mDetail\u001B[0m                                                                      │\n",
       "│ 61  │ \u001B[38;5;32mSolar\u001B[0m\u001B[38;5;160mEnergy\u001B[0m\u001B[38;5;71mSystems\u001B[0m\u001B[38;5;32mNet\u001B[0m\u001B[38;5;160mComponentsof\u001B[0m\u001B[38;5;71mSolar\u001B[0m\u001B[38;5;32mEnergy\u001B[0m\u001B[38;5;160mSystems\u001B[0m\u001B[38;5;71mNet\u001B[0m\u001B[38;5;32mDetails\u001B[0m                                             │\n",
       "│ 62  │ \u001B[38;5;32mProperty\u001B[0m\u001B[38;5;160mPlantand\u001B[0m\u001B[38;5;71mEquipment\u001B[0m\u001B[38;5;32mNet\u001B[0m\u001B[38;5;160mScheduleof\u001B[0m\u001B[38;5;71mProperty\u001B[0m\u001B[38;5;32mPlantand\u001B[0m\u001B[38;5;160mEquipment\u001B[0m\u001B[38;5;71mNet\u001B[0m\u001B[38;5;32mDetail\u001B[0m                                  │\n",
       "│ 63  │ \u001B[38;5;32mProperty\u001B[0m\u001B[38;5;160mPlantand\u001B[0m\u001B[38;5;71mEquipment\u001B[0m\u001B[38;5;32mNet\u001B[0m\u001B[38;5;160mAdditional\u001B[0m\u001B[38;5;71mInformation\u001B[0m\u001B[38;5;32mDetail\u001B[0m                                                   │\n",
       "│ 64  │ \u001B[38;5;32mAccrued\u001B[0m\u001B[38;5;160mLiabilitiesand\u001B[0m\u001B[38;5;71mOther\u001B[0m\u001B[38;5;32mScheduleof\u001B[0m\u001B[38;5;160mAccrued\u001B[0m\u001B[38;5;71mLiabilitiesand\u001B[0m\u001B[38;5;32mOther\u001B[0m\u001B[38;5;160mCurrent\u001B[0m\u001B[38;5;71mLiabilities\u001B[0m\u001B[38;5;32mDetail\u001B[0m                    │\n",
       "│ 65  │ \u001B[38;5;32mOther\u001B[0m\u001B[38;5;160mLong\u001B[0m\u001B[38;5;71mTerm\u001B[0m\u001B[38;5;32mLiabilities\u001B[0m\u001B[38;5;160mScheduleof\u001B[0m\u001B[38;5;71mOther\u001B[0m\u001B[38;5;32mLongterm\u001B[0m\u001B[38;5;160mLiabilities\u001B[0m\u001B[38;5;71mDetail\u001B[0m                                          │\n",
       "│ 66  │ \u001B[38;5;32mDebt\u001B[0m\u001B[38;5;160mSummaryof\u001B[0m\u001B[38;5;71mDebtand\u001B[0m\u001B[38;5;32mFinance\u001B[0m\u001B[38;5;160mLeases\u001B[0m\u001B[38;5;71mDetail\u001B[0m                                                                   │\n",
       "│ 67  │ \u001B[38;5;32mDebt\u001B[0m\u001B[38;5;160mAdditional\u001B[0m\u001B[38;5;71mInformation\u001B[0m\u001B[38;5;32mDetails\u001B[0m                                                                          │\n",
       "│ 68  │ \u001B[38;5;32mDebt\u001B[0m\u001B[38;5;160mPrincipalof\u001B[0m\u001B[38;5;71mMaturitiesof\u001B[0m\u001B[38;5;32mDebt\u001B[0m\u001B[38;5;160mDetails\u001B[0m                                                                    │\n",
       "│ 69  │ \u001B[38;5;32mLeases\u001B[0m\u001B[38;5;160mAdditional\u001B[0m\u001B[38;5;71mInformation\u001B[0m\u001B[38;5;32mDetail\u001B[0m                                                                         │\n",
       "│ 70  │ \u001B[38;5;32mLeases\u001B[0m\u001B[38;5;160mScheduleof\u001B[0m\u001B[38;5;71mOperatingand\u001B[0m\u001B[38;5;32mFinancing\u001B[0m\u001B[38;5;160mLeases\u001B[0m\u001B[38;5;71mPresentedin\u001B[0m\u001B[38;5;32mBalance\u001B[0m\u001B[38;5;160mSheets\u001B[0m\u001B[38;5;71mDetail\u001B[0m                                 │\n",
       "│ 71  │ \u001B[38;5;32mLeases\u001B[0m\u001B[38;5;160mScheduleof\u001B[0m\u001B[38;5;71mComponentsof\u001B[0m\u001B[38;5;32mLease\u001B[0m\u001B[38;5;160mExpenseand\u001B[0m\u001B[38;5;71mOther\u001B[0m\u001B[38;5;32mInformation\u001B[0m\u001B[38;5;160mRelatedto\u001B[0m\u001B[38;5;71mLeases\u001B[0m\u001B[38;5;32mDetail\u001B[0m                          │\n",
       "│ 72  │ \u001B[38;5;32mLeases\u001B[0m\u001B[38;5;160mSupplemental\u001B[0m\u001B[38;5;71mCash\u001B[0m\u001B[38;5;32mFlow\u001B[0m\u001B[38;5;160mInformation\u001B[0m\u001B[38;5;71mRelatedto\u001B[0m\u001B[38;5;32mLeases\u001B[0m\u001B[38;5;160mDetail\u001B[0m                                                │\n",
       "│ 73  │ \u001B[38;5;32mLeases\u001B[0m\u001B[38;5;160mScheduleof\u001B[0m\u001B[38;5;71mMaturitiesof\u001B[0m\u001B[38;5;32mOperatingand\u001B[0m\u001B[38;5;160mFinance\u001B[0m\u001B[38;5;71mLease\u001B[0m\u001B[38;5;32mLiabilities\u001B[0m\u001B[38;5;160mDetail\u001B[0m                                     │\n",
       "│ 74  │ \u001B[38;5;32mLeases\u001B[0m\u001B[38;5;160mMaturitiesof\u001B[0m\u001B[38;5;71mOperating\u001B[0m\u001B[38;5;32mLeaseand\u001B[0m\u001B[38;5;160mSales\u001B[0m\u001B[38;5;71mType\u001B[0m\u001B[38;5;32mLease\u001B[0m\u001B[38;5;160mReceivablesfrom\u001B[0m\u001B[38;5;71mCustomers\u001B[0m\u001B[38;5;32mDetail\u001B[0m                           │\n",
       "│ 75  │ \u001B[38;5;32mLeases\u001B[0m\u001B[38;5;160mScheduleof\u001B[0m\u001B[38;5;71mLease\u001B[0m\u001B[38;5;32mReceivables\u001B[0m\u001B[38;5;160mRelatingto\u001B[0m\u001B[38;5;71mSales\u001B[0m\u001B[38;5;32mType\u001B[0m\u001B[38;5;160mLeases\u001B[0m\u001B[38;5;71mDetail\u001B[0m                                           │\n",
       "│ 76  │ \u001B[38;5;32mLeases\u001B[0m\u001B[38;5;160mScheduleoffutureminimummasterleasepaymentstobereceivedfrominvestors\u001B[0m\u001B[38;5;71mDetail\u001B[0m                           │\n",
       "│ 77  │ \u001B[38;5;32mEquity\u001B[0m\u001B[38;5;160mIncentive\u001B[0m\u001B[38;5;71mPlans\u001B[0m\u001B[38;5;32mAdditional\u001B[0m\u001B[38;5;160mInformation\u001B[0m\u001B[38;5;71mDetail\u001B[0m                                                           │\n",
       "│ 78  │ \u001B[38;5;32mEquity\u001B[0m\u001B[38;5;160mIncentive\u001B[0m\u001B[38;5;71mPlans\u001B[0m\u001B[38;5;32mSummaryof\u001B[0m\u001B[38;5;160mStock\u001B[0m\u001B[38;5;71mOptionand\u001B[0m\u001B[38;5;32mRSU\u001B[0m\u001B[38;5;160mActivity\u001B[0m\u001B[38;5;71mDetail\u001B[0m                                              │\n",
       "│ 79  │ \u001B[38;5;32mEquity\u001B[0m\u001B[38;5;160mIncentive\u001B[0m\u001B[38;5;71mPlans\u001B[0m\u001B[38;5;32mScheduleof\u001B[0m\u001B[38;5;160mFair\u001B[0m\u001B[38;5;71mValueof\u001B[0m\u001B[38;5;32mStock\u001B[0m\u001B[38;5;160mOption\u001B[0m\u001B[38;5;71mAwardand\u001B[0m\u001B[38;5;32mESP\u001B[0m\u001B[38;5;160mPon\u001B[0m\u001B[38;5;71mGrant\u001B[0m\u001B[38;5;32mDate\u001B[0m\u001B[38;5;160mDetail\u001B[0m                         │\n",
       "│ 80  │ \u001B[38;5;32mEquity\u001B[0m\u001B[38;5;160mIncentive\u001B[0m\u001B[38;5;71mPlans\u001B[0m\u001B[38;5;32mSummaryof\u001B[0m\u001B[38;5;160mOperational\u001B[0m\u001B[38;5;71mMilestone\u001B[0m\u001B[38;5;32mBasedon\u001B[0m\u001B[38;5;160mRevenueor\u001B[0m\u001B[38;5;71mAdjusted\u001B[0m\u001B[38;5;32mEBITDA\u001B[0m\u001B[38;5;160mDetail\u001B[0m                     │\n",
       "│ 81  │ \u001B[38;5;32mEquity\u001B[0m\u001B[38;5;160mIncentive\u001B[0m\u001B[38;5;71mPlans\u001B[0m\u001B[38;5;32mSummaryof\u001B[0m\u001B[38;5;160mStock\u001B[0m\u001B[38;5;71mBased\u001B[0m\u001B[38;5;32mCompensation\u001B[0m\u001B[38;5;160mExpense\u001B[0m\u001B[38;5;71mDetail\u001B[0m                                          │\n",
       "│ 82  │ \u001B[38;5;32mIncome\u001B[0m\u001B[38;5;160mTaxes\u001B[0m\u001B[38;5;71mScheduleof\u001B[0m\u001B[38;5;32mIncomebefore\u001B[0m\u001B[38;5;160mProvision\u001B[0m\u001B[38;5;71mFor\u001B[0m\u001B[38;5;32mIncome\u001B[0m\u001B[38;5;160mTaxes\u001B[0m\u001B[38;5;71mDetails\u001B[0m                                           │\n",
       "│ 83  │ \u001B[38;5;32mIncome\u001B[0m\u001B[38;5;160mTaxes\u001B[0m\u001B[38;5;71mAdditional\u001B[0m\u001B[38;5;32mInformation\u001B[0m\u001B[38;5;160mDetails\u001B[0m                                                                   │\n",
       "│ 84  │ \u001B[38;5;32mIncome\u001B[0m\u001B[38;5;160mTaxes\u001B[0m\u001B[38;5;71mComponentsof\u001B[0m\u001B[38;5;32mProvisionfor\u001B[0m\u001B[38;5;160mIncome\u001B[0m\u001B[38;5;71mTaxes\u001B[0m\u001B[38;5;32mDetails\u001B[0m                                                     │\n",
       "│ 85  │ \u001B[38;5;32mIncome\u001B[0m\u001B[38;5;160mTaxes\u001B[0m\u001B[38;5;71mScheduleof\u001B[0m\u001B[38;5;32mReconciliationof\u001B[0m\u001B[38;5;160mTaxesat\u001B[0m\u001B[38;5;71mFederal\u001B[0m\u001B[38;5;32mStatutory\u001B[0m\u001B[38;5;160mRateto\u001B[0m\u001B[38;5;71mProvisionfor\u001B[0m\u001B[38;5;32mIncome\u001B[0m\u001B[38;5;160mTaxes\u001B[0m\u001B[38;5;71mDetails\u001B[0m          │\n",
       "│ 86  │ \u001B[38;5;32mIncome\u001B[0m\u001B[38;5;160mTaxes\u001B[0m\u001B[38;5;71mScheduleof\u001B[0m\u001B[38;5;32mDeferred\u001B[0m\u001B[38;5;160mTax\u001B[0m\u001B[38;5;71mAssets\u001B[0m\u001B[38;5;32mLiabilities\u001B[0m\u001B[38;5;160mDetails\u001B[0m                                                  │\n",
       "│ 87  │ \u001B[38;5;32mIncome\u001B[0m\u001B[38;5;160mTaxes\u001B[0m\u001B[38;5;71mScheduleof\u001B[0m\u001B[38;5;32mChangesto\u001B[0m\u001B[38;5;160mGross\u001B[0m\u001B[38;5;71mUnrecognized\u001B[0m\u001B[38;5;32mTax\u001B[0m\u001B[38;5;160mBenefits\u001B[0m\u001B[38;5;71mDetails\u001B[0m                                         │\n",
       "│ 88  │ \u001B[38;5;32mCommitmentsand\u001B[0m\u001B[38;5;160mContingencies\u001B[0m\u001B[38;5;71mDetail\u001B[0m                                                                         │\n",
       "│ 89  │ \u001B[38;5;32mVariable\u001B[0m\u001B[38;5;160mInterest\u001B[0m\u001B[38;5;71mEntity\u001B[0m\u001B[38;5;32mArrangements\u001B[0m\u001B[38;5;160mCarrying\u001B[0m\u001B[38;5;71mValuesof\u001B[0m\u001B[38;5;32mAssetsand\u001B[0m\u001B[38;5;160mLiabilitiesof\u001B[0m\u001B[38;5;71mSubsidiaryin\u001B[0m\u001B[38;5;32mConsolidated\u001B[0m\u001B[38;5;160mBalance\u001B[0m\u001B[38;5;71mS…\u001B[0m │\n",
       "│ 90  │ \u001B[38;5;32mSegment\u001B[0m\u001B[38;5;160mReportingand\u001B[0m\u001B[38;5;71mInformationabout\u001B[0m\u001B[38;5;32mGeographic\u001B[0m\u001B[38;5;160mAreas\u001B[0m\u001B[38;5;71mAdditional\u001B[0m\u001B[38;5;32mInformation\u001B[0m\u001B[38;5;160mDetail\u001B[0m                             │\n",
       "│ 91  │ \u001B[38;5;32mSegment\u001B[0m\u001B[38;5;160mReportingand\u001B[0m\u001B[38;5;71mInformationabout\u001B[0m\u001B[38;5;32mGeographic\u001B[0m\u001B[38;5;160mAreas\u001B[0m\u001B[38;5;71mScheduleof\u001B[0m\u001B[38;5;32mTotal\u001B[0m\u001B[38;5;160mRevenuesand\u001B[0m\u001B[38;5;71mGross\u001B[0m\u001B[38;5;32mProfitby\u001B[0m\u001B[38;5;160mReportable\u001B[0m\u001B[38;5;71mSegme…\u001B[0m │\n",
       "│ 92  │ \u001B[38;5;32mSegment\u001B[0m\u001B[38;5;160mReportingand\u001B[0m\u001B[38;5;71mInformationabout\u001B[0m\u001B[38;5;32mGeographic\u001B[0m\u001B[38;5;160mAreas\u001B[0m\u001B[38;5;71mScheduleof\u001B[0m\u001B[38;5;32mRevenuesby\u001B[0m\u001B[38;5;160mGeographic\u001B[0m\u001B[38;5;71mArea\u001B[0m\u001B[38;5;32mDetail\u001B[0m                │\n",
       "│ 93  │ \u001B[38;5;32mSegment\u001B[0m\u001B[38;5;160mReportingand\u001B[0m\u001B[38;5;71mInformationabout\u001B[0m\u001B[38;5;32mGeographic\u001B[0m\u001B[38;5;160mAreas\u001B[0m\u001B[38;5;71mScheduleof\u001B[0m\u001B[38;5;32mLong\u001B[0m\u001B[38;5;160mLived\u001B[0m\u001B[38;5;71mAssetsby\u001B[0m\u001B[38;5;32mGeographic\u001B[0m\u001B[38;5;160mArea\u001B[0m\u001B[38;5;71mDetail\u001B[0m         │\n",
       "│ 94  │ \u001B[38;5;32mSegment\u001B[0m\u001B[38;5;160mReportingand\u001B[0m\u001B[38;5;71mInformationabout\u001B[0m\u001B[38;5;32mGeographic\u001B[0m\u001B[38;5;160mAreas\u001B[0m\u001B[38;5;71mScheduleofinventorybyreportablesegment\u001B[0m\u001B[38;5;32mDetail\u001B[0m            │\n",
       "│ 95  │ \u001B[38;5;32mRestructuringand\u001B[0m\u001B[38;5;160mOther\u001B[0m\u001B[38;5;71mDetail\u001B[0m                                                                               │\n",
       "│ 96  │ \u001B[38;5;32mAward\u001B[0m\u001B[38;5;160mTiming\u001B[0m\u001B[38;5;71mDisclosure\u001B[0m                                                                                     │\n",
       "│ 97  │ \u001B[38;5;32mInsider\u001B[0m\u001B[38;5;160mTrading\u001B[0m\u001B[38;5;71mArrangements\u001B[0m                                                                                │\n",
       "│ 98  │ \u001B[38;5;32mErr\u001B[0m\u001B[38;5;160mComp\u001B[0m\u001B[38;5;71mDisclosure\u001B[0m                                                                                         │\n",
       "│ 99  │ \u001B[38;5;32mPvp\u001B[0m\u001B[38;5;160mDisclosure\u001B[0m                                                                                             │\n",
       "│ 100 │ \u001B[38;5;32mInsider\u001B[0m\u001B[38;5;160mTrading\u001B[0m\u001B[38;5;71mPolicies\u001B[0m\u001B[38;5;32mProc\u001B[0m                                                                                │\n",
       "╰─────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────╯"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 17
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "To see an individual statement, use the bracket `[]` operator. ",
   "id": "ba095dcf6a557c52"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-11-14T15:15:28.345845Z",
     "start_time": "2024-11-14T15:15:28.300668Z"
    }
   },
   "cell_type": "code",
   "source": "xb.statements[91]",
   "id": "652a502ac194f2f4",
   "outputs": [
    {
     "data": {
      "text/plain": [],
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "                                                  \u001B[1;38;5;38mTesla, Inc.\u001B[0m                                                   \n",
       "                                               \u001B[1mSegment Reporting\u001B[0m                                                \n",
       "                                                     \u001B[3;38;5;250mAnnual\u001B[0m                                                     \n",
       "                                                                                                                \n",
       " \u001B[1m \u001B[0m\u001B[1m                                                  \u001B[0m\u001B[1m \u001B[0m \u001B[1m        \u001B[0m\u001B[1m \u001B[0m \u001B[1m          2023\u001B[0m\u001B[1m \u001B[0m \u001B[1m          2022\u001B[0m\u001B[1m \u001B[0m \u001B[1m          2021\u001B[0m\u001B[1m \u001B[0m \n",
       " ────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
       "  \u001B[37mRevenues                                          \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m          96,773          81,462          53,823  \n",
       "  \u001B[37m  Automotive segment                              \u001B[0m  \u001B[2;38;5;249m        \u001B[0m  90,738,000,000  77,553,000,000  51,034,000,000  \n",
       "  \u001B[37m  Energy generation and storage segment           \u001B[0m  \u001B[2;38;5;249m        \u001B[0m   6,035,000,000   3,909,000,000   2,789,000,000  \n",
       "  \u001B[37mGross profit                                      \u001B[0m  \u001B[2;38;5;249mmillions\u001B[0m          17,660          20,853          13,606  \n",
       "  \u001B[37m  Automotive segment                              \u001B[0m  \u001B[2;38;5;249m        \u001B[0m  16,519,000,000  20,565,000,000  13,735,000,000  \n",
       "  \u001B[37m  Energy generation and storage segment           \u001B[0m  \u001B[2;38;5;249m        \u001B[0m   1,141,000,000     288,000,000   (129,000,000)  \n",
       "                                                                                                                "
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 23
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
